import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/auth/v1/pcAdmin/oauth/token',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: 'sys/v1/account/userInfo',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}


export function addAccount(data) {
  return request({
    url: '/sys/v1/account/add',
    method: 'post',
    data
  })
}

export function modifyAccount(data) {
  return request({
    url: '/sys/v1/account/modify',
    method: 'post',
    data
  })
}


export function listAccount(data) {
  return request({
    url: '/sys/v1/account/list',
    method: 'get',
    params:data
  })
}
